#include<stdio.h>
#include<stdlib.h>

struct stu
{
	char name[20];
	int age;
};

int amp(const void* e1,const void* e2)
{
	return (((struct stu*)e1)->age-((struct stu*)e2)->age);
}

void test3()
{
	struct stu s[3]={{"aaa",12},{"bbb",13},{"ccc",14}};
	int sz=sizeof(s)/sizeof(s[0]);
	qsort(s,sz,sizeof(s[0]),amp);
}
int main()
{
	test3();
	return 0;
}
